import AuthManager from "@/components/systemManager/AuthManager";
import ResourceManager from "@/components/systemManager/ResourceManager";
import UserManager from "@/components/systemManager/UserManager";
import Dictionary from "@/components/systemManager/Dictionary";
import SystemConstants from "@/components/systemOperation/SystemConstants";
import Dashboard from "@/components/Dashboard";
import CssText from "@/components/CssText";
import CssFont from "@/components/CssFont";
import CssBorder from "@/components/CssBorder";
import CssHolyGrail from "@/components/CssHolyGrail";
import CssFlex from "@/components/CssFlex";

import Links from "@/views/Links";
import FlexLayout from "@/components/FlexLayout";
import GridLayout from "@/components/GridLayout";
import Login from "@/components/Login";
export default [
  { path: "/", redirect: "/index" },
  {
    path: "/links",

    component: Links,
    children: [
      { path: "/flex", name: "flex", component: FlexLayout },
      { path: "/", name: "flx", component: FlexLayout },
      { path: "/grid", name: "grid", component: GridLayout }
    ]
  },
  {
    path: "/login",
    component: Login,
    meta: {
      title: "登录"
    }
  },
  {
    path: "/",
    component: () => import(/* webpackChunkName: "home" */ "@/views/Home.vue"),
    meta: { title: "自述文件" },
    children: [
      { path: "/index", component: Dashboard, meta: { title: "dashborad" } },
      {
        path: "/auth-manager",
        component: AuthManager,
        meta: { title: "权限管理" }
      },
      {
        path: "/resource-manager",
        component: ResourceManager,
        meta: { title: "资源管理" }
      },
      {
        path: "/user-manager",
        component: UserManager,
        meta: { title: "用户管理" }
      },
      {
        path: "/dictionary",
        component: Dictionary,
        meta: { title: "系统字典" }
      },
      {
        path: "/system-constants",
        component: SystemConstants,
        meta: { title: "系统常量" }
      },
      {
        path: "/css-text",
        name: "cssText",
        meta: { title: "css文本" },
        component: CssText
      },
      {
        path: "/css-font",
        name: "cssFont",
        meta: { title: "css字体" },
        component: CssFont
      },
      {
        path: "/css-border",
        name: "cssBorder",
        meta: { title: "css边框" },
        component: CssBorder
      },
      {
        path: "/css-layout",
        name: "cssLayout",
        meta: { title: "css布局" },
        component: CssHolyGrail
      },
      {
        path: "/css-flex-layout",
        name: "cssFlex",
        meta: { title: "cssflex布局" },
        component: CssFlex
      },

      {
        // 国际化组件
        path: "/i18n",
        component: () =>
          import(/* webpackChunkName: "i18n" */ "@/components/I18n.vue"),
        meta: { title: "国际化" }
      },

      {
        path: "/404",
        component: () =>
          import(/* webpackChunkName: "404" */ "@/components/404.vue"),
        meta: { title: "404" }
      },
      {
        path: "/403",
        component: () =>
          import(/* webpackChunkName: "403" */ "@/components/403.vue"),
        meta: { title: "403" }
      }
    ]
  },

  {
    path: "*",
    redirect: "/404"
  }
];
